-
-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FEATURE: [okx] support query open orders #1498
Conversation
Welcome back! @bailantaotao, This pull request may get 934 BBG. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1498 +/- ##
==========================================
+ Coverage 21.60% 21.70% +0.10%
==========================================
Files 605 606 +1
Lines 44101 44112 +11
==========================================
+ Hits 9527 9576 +49
+ Misses 33879 33841 -38
Partials 695 695
Continue to review full report in Codecov by Sentry.
|
fe21dfe
to
977531c
Compare
Re-estimated karma: this pull request may get 944 BBG |
@@ -58,6 +58,10 @@ const ( | |||
OrderStateFilled OrderState = "filled" | |||
) | |||
|
|||
func (o OrderState) IsWorking() bool { | |||
return o == OrderStateLive || o == OrderStatePartiallyFilled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you can use switch case here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? The function represents only the working status- either live or partially filled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
like this:
switch o { case OrderStateLive, OrderStatePartiallyFilled: return true; default: return false }
// Options price in USDOnly applicable to options; return "" for other instrument types | ||
PriceUsd string `json:"pxUsd"` | ||
// Implied volatility of the options orderOnly applicable to options; return "" for other instrument types | ||
PriceVol string `json:"pxVol"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
decided not to use fixedpoint.Value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the field is only used in options, I ignore it. XD
i can update it
977531c
to
f81fc66
Compare
Re-estimated karma: this pull request may get 989 BBG |
Re-estimated karma: this pull request may get 1089 BBG |
pkg/exchange/okex/exchange.go
Outdated
|
||
req := e.client.NewGetOpenOrdersRequest(). | ||
InstrumentID(instrumentID). | ||
After(fmt.Sprintf("%d", nextCursor)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to use strconv.Itoa
strconv.Itoa is faster than fmt.Sprintf
bd0ed5a
to
228bfba
Compare
Re-estimated karma: this pull request may get 1019 BBG |
Hi @bailantaotao, Well done! 1024 BBG has been sent to your polygon wallet. Please check the following tx: https://polygonscan.com/tx/0x5169f2b98c958c008164075a2a567f35f5f73459ebfb797eeefdc2e15ae1aa85 Thank you for your contribution! |
No description provided.